package com.guguju.ssms.feature.Home;

import android.content.Context;
import android.content.res.Resources;

import com.guguju.ssms.R;
import com.guguju.ssms.bean.UserDayProject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;

/**
 * Created by dell on 2022-5-16.
 */
public class indexAdapte extends BaseQuickAdapter<UserDayProject, BaseViewHolder> {

    private Context context;
    private Resources resources;

    public indexAdapte(Context context, List<UserDayProject> data) {
        super(R.layout.item_index_userdayproject, data);
        this.context = context;
        resources = context.getResources();
    }

    @Override
    protected void convert(BaseViewHolder helper, UserDayProject item) {
        helper.setText(R.id.tv_dayproject_name,item.getDayProjectName());
        helper.setText(R.id.tv_dayprojectType, "任务类型:"+item.getDayProjectTypeStr());
        helper.setText(R.id.tv_projectName, "项目名称："+item.getDayProjectName());
        helper.setText(R.id.tv_issueTime, "下发时间："+item.getIssueTimeStr());


        helper.setText(R.id.tv_dayprojectTime, item.getStartTimeStr()+"-"+item.getEndTimeStr());

        helper.addOnClickListener(R.id.bt_dayproject_complete);
    }
}
